package com.usian.feign;

import com.usian.pojo.TbUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient("usian-sso-service")
public interface SSOSeriviceFeign {
    //校验用户名或者手机号重复
    @RequestMapping("/service/sso/checkUserInfo/{checkValue}/{checkFlag}")
    Boolean checkUserInfo(@PathVariable String checkValue,@PathVariable Integer checkFlag);
    //用户注册
    @RequestMapping("/service/sso/userRegister")
    Integer userRegister(@RequestBody TbUser user);
    //用户登录
    @RequestMapping("/service/sso/userLogin")
    Map userLogin(@RequestParam String username,@RequestParam String password);
    //查询用户登录是否过期
    @PostMapping("/service/sso/getUserByToken/{token}")
    TbUser getUserByToken(@PathVariable String token);
    //用户退出登录
    @PostMapping("/service/sso/logOut")
    Boolean logOut(@RequestParam String token);
}
